package Draw;
public class Tank {
    private int x;
    private int y;
    private int direction;
    private int speed=5;
    boolean loop=true;

    public Tank(int x, int y) {
        this.x = x;
        this.y = y;
    }
    public void setDirection(int direction) {
        this.direction = direction;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getSpeed() {
        return speed;
    }

    public int getDirection() {
        return direction;
    }
    public int getX() {
        return x;
    }
    public void setX(int x) {
        this.x = x;
    }
    public int getY() {
        return y;
    }
    public void setY(int y) {
        this.y = y;
    }
    public void Up(){
        y-=speed;
    }
    public void Down(){
        y+=speed;
    }
    public void Right(){
         x-=speed;
    }
    public void Left(){
        x+=speed;
    }
}
